package dp.leetcode_70;

public class BestDP {
    public int climbStairs(int n) {
        if(n < 3){
            return n;
        }
        int first = 1;
        int second = 2;
        for(int i = 3; i < n + 1; i++){
            int temp = first + second;
            first = second;
            second = temp;
        }
        return second;
    }
}
